import request from '@/utils/request';
import { praseStrEmpty } from "@/utils/ruoyi";

// 新增特征
export function saveFeature(data) {
  return request({
    url: '/trade/feature/save',
    method: 'post',
    data: data
  })
}

// 删除特征
export function removeFeature(featureIds) {
  return request({
    url: '/trade/feature/remove/' + featureIds,
    method: 'delete'
  })
}

// 修改特征
export function updateFeature(data) {
  return request({
    url: '/trade/feature/update',
    method: 'put',
    data: data
  })
}

// 查询特征详细
export function getFeature(featureId) {
  return request({
    url: '/trade/feature/' + praseStrEmpty(featureId),
    method: 'get'
  })
}

// 查询特征列表
export function searchFeature(query) {
  return request({
    url: '/trade/feature/search',
    method: 'get',
    params: query
  })
}